<template>
  <div>
    <h1 class="mat-2">子组件</h1>
    <p class="mat-2">{{ msg }}</p>
    <Button class="mat-2" @click="bubbleEvent">冒泡事件给父组件</Button>
  </div>
</template>
<script>
export default {
  props: {
    msg: {
      type: String,
      default: ''
    }
  },
  methods: {
    // 冒泡子组件事件给父组件
    bubbleEvent () {
      this.$emit('change-msg')
    }
  }
}
</script>
